| Description | : The `Get Geocoding` API is an HTTP `GET` request that returns the longitude and latitude coordinates of the location being searched. In many cases, the complete search service might be too much, for instance if you are only interested in traditional geocoding. Search can also be accessed for address look up exclusively. The geocoding is performed by hitting the geocoding endpoint with just the address or partial address in question. The geocoding search index will be queried for everything above the street level data. No Point of Interest (POIs) will be returned. Note that the geocoder is very tolerant of typos and incomplete addresses. It will also handle everything from exact street addresses or street or intersections as well as higher level geographies such as city centers, counties and states. The response also returns detailed address properties such as street, postal code, municipality, and country/region information. |
| Reference | : Link ¶ |
⚶ Changes
{
"#id": "Search_GetGeocoding",
"$parameters": [
{
"#name": "Accept-Language",
"Description": {
"new": "Language in which search results should be returned. \n\nPlease refer to [Supported Languages](/azure/azure-maps/supported-languages?pivots=service-latest) for details.",
"old": "Language in which search results should be returned. \n\nPlease refer to [Supported Languages](/azure/azure-maps/supported-languages) for details."
}
},
{
"#name": "bbox",
"Description": {
"new": "A rectangular area on the earth defined as a bounding box object. The sides of the rectangle are defined by longitude and latitude values. When you specify this parameter, the geographical area is taken into account when computing the results of a location query.\n\nExample: lon1,lat1,lon2,lat2.\n\nMinimum size: approximately 0.00001 degrees (~0.01 meters).\n\n Maximum size: up to the full global extent (-180,-90 to 180,90)",
"old": "A rectangular area on the earth defined as a bounding box object. The sides of the rectangles are defined by longitude and latitude values. When you specify this parameter, the geographical area is taken into account when computing the results of a location query.\n\nExample: lon1,lat1,lon2,lat2"
}
}
],
"$responses": {
"200": {
"$properties": [
{
"#name": "type",
"Description": {
"new": "Specifies the `GeoJSON` type. The only supported object type is `FeatureCollection`. For more information, see [RFC 7946](https://www.rfc-editor.org/rfc/rfc7946).",
"old": "The type of a FeatureCollection object must be FeatureCollection."
},
"Enum": {
"new": [
[
"FeatureCollection",
"Specifies the `GeoJSON` `FeatureCollection` object type."
]
],
"old": [
[
"FeatureCollection",
""
]
]
}
},
{
"features": {
"$properties": [
{
"#name": "type",
"Enum": {
"new": [
[
"Feature",
"Specifies the `GeoJSON` Feature object type."
]
],
"old": [
[
"Feature",
""
]
]
}
}
]
}
}
]
}
}
}
⚼ Request
GET:
/geocode
{
api-version:
string
,
Accept-Language:
string
,
top:
integer
,
query:
string
,
addressLine:
string
,
countryRegion:
string
,
bbox:
array
,
view:
string
,
coordinates:
array
,
adminDistrict:
string
,
adminDistrict2:
string
,
adminDistrict3:
string
,
locality:
string
,
postalCode:
string
,
x-ms-client-id:
string
,
}
⚐ Response (200)
{
$headers:
{
,
x-ms-request-id:
string
,
}
$schema:
}
{
,
type:
enum
,
features:
[
]
,
{
,
type:
enum
,
id:
string
,
properties:
{
,
type:
string
,
confidence:
enum
,
matchCodes:
[
,
string
,
]
address:
{
,
addressLine:
string
,
locality:
string
,
neighborhood:
string
,
adminDistricts:
[
]
,
{
,
name:
string
,
shortName:
string
,
}
postalCode:
string
,
countryRegion:
{
,
ISO:
string
,
name:
string
,
}
formattedAddress:
string
,
streetName:
string
,
streetNumber:
string
,
intersection:
}
{
,
baseStreet:
string
,
secondaryStreet1:
string
,
secondaryStreet2:
string
,
intersectionType:
string
,
displayName:
string
,
}
geocodePoints:
}
[
]
,
{
,
geometry:
object
,
calculationMethod:
enum
,
usageTypes:
}
[
,
string
,
]
geometry:
object
,
bbox:
}
[
,
number
,
]
nextLink:
string
,
}
⚐ Response (default)
{
error:
}
{
,
code:
string
,
message:
string
,
target:
string
,
details:
[
,
string
,
]
additionalInfo:
}
[
]
,
{
,
type:
string
,
info:
object
,
}